package svc

import (
	"person/api/internal/config"
	"person/personrpc/personrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	PersonRpc personrpcclient.Personrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		PersonRpc: personrpcclient.NewPersonrpc(zrpc.MustNewClient(c.PersonRpc)),
	}
}
